<?php


require_once("./connect.php");

$ini=parse_ini_file('config.ini',false);



$imagesrc=$_POST['src'];
$temp='userid';
if(mysql_select_db($ini['dbName']))
{
    //$q="INSERT INTO `cards`( `json`, `userId`  )VALUES('$abc', '$temp');";
    
    $q="INSERT INTO `uploads`( `source`)VALUES('$imagesrc');";

    
   // echo $q;
    if(mysql_query($q))
    {
     
        $q="Select Max(id) as id From uploads ;";
    $r = mysql_query($q);
while($vname = mysql_fetch_array($r)){
$id = $vname['id'];
    
}


//$id=18;
//echo ($abc);
echo ($id);

// echo "inserted";
    }
    else
    {
        //echo "not inserted";
    }
    //max id pakro or echo keraa do
    
    
}

 else{
 
    
    //echo "connected";
}

?>